Repository navigation
workflow: a live list row says how many runs are live, and a read-only mount writes nothing - #2224
Conversation
572f744 to
910d52c
Compare
|
@Birfy review request — #2224 at Ready for review at this exact tip (not draft, What it does: a workflow list row that has live runs now shows how many beside the live dot ( Red-first at this tip: with only Advisory only, not a gate: an independent FlyBot QA pass and an independent probe (35/35 at this tip; 11 red against the base client, including the arrival-order case) are in my report to the lead, not posted here. Known non-blocking follow-up (will be a separate issue, not a new tip): on rows that have live runs the row's |
|
Verdict: PASS at 910d52c Ran at this tip: Red first, at this tip: with only Scope: 4 files, all named in the PR — Review points:
|
…ount writes nothing (ThinkFlowLab#2222) A live list row drew a bare colour with no number, so a read-only reader could not tell one running run from five; the row now carries the count beside the dot and in its accessible name. The mount effect also decided whether to ingest from `locked` as its first render saw it, so a window that turned read-only after the list mounted still sent `workflow/ingest` for every open card, a write the host refuses. It now reads the latest value at each step.
910d52c to
a2acc07
Compare
|
Verdict: PASS at a2acc07 Ran at this tip: This reviews the rebased head Red first, at this tip: with only Scope: 4 files, all named in the PR — Review points:
|
|
@Birfy review request — #2224 at Ready for review at this head (it is a re-base onto
Nothing else is pending on my side; the body carries the same coordinates and numbers. |
Fixes #2222
Owner: Dev-1
Written-by: Dev-1
Reviewer: Birfy
Claim-Id: d0305775a2e54c859fd92ec21340049b
Branch: dev/1-workflow-listrow-live-count
Base: 2a0bbb2
Tier: T2
Tree: 6098208037d0c6f1dbf12976e3337d519fc7f0f9
Head: a2acc07
Single parent: 2a0bbb2
What changes
Three gaps in the Workflows sidebar list, all in
plugins/workflow/client.js.A. A live row says how many. The row drew
span.wf-liveas a bare,aria-hiddencolour wheneveractiveCount > 0, so a reader who cannot see the colour — and a read-only window, whose only live signal is this view — could not tell one running run from five. The CPU-onlyactiveCountalso never reached the row's accessible name or any visible node.The row now draws
.wf-live-wraparound the dot plus a.wf-live-nnode whose text is the count, and carriesaria-label="{name} · {count} running"(zh:{name} · {count} 个在运行) when the count is above zero. AtactiveCount: 0nothing changes: no dot, no count node, no digit, and noaria-label, so the row keeps its own text as its name. Click and the existing row behaviour are unchanged.B. A read-only mount writes nothing. The mount
useEffectread the board and, for every open card, calledworkflow/ingest— a claim/match write the host refuses in a read-only window — replacing the pack each time. The only trace was N refused writes.The effect now returns before the
tasksread when the window is locked, while keeping theprojectsread above it so the Project filter still fills. A writable window keeps ingesting every open card exactly as today.ingestis still reachable through the explicit Re-match action, which is the one place a person asked for it.C. The read-only sentence may land after the mount. A cold window starts on the empty roster (
ready: false, noreadOnly) and the read-only sentence arrives a tick later, so an effect that bakedlockedin on its first render still ran the ingest branch — threeworkflow/ingestcalls for three open cards, every one refused. The effect now asks a ref that every render refreshes, both before thetasksread and between two cards, so a roster that turns read-only mid-flight stops the writes instead of finishing them. This guard is separate from theopenWorkflowAssigndoor's own[locked]dependency (#2213); neither replaces the other.Docs:
docs/subsystems/workflow.mddescribes the row's count, the read-only mount behaviour, and the late-roster case. Changelog:changelog.d/2222-list-live-count.fixed.md.Red first
The tests are in
plugins/workflow/test/client.test.js(five new tests; the file carries 142, the 137 on the base plus these five). They count over the whole rendered tree (findAll(view.tree, …)), never inside one row, and each mount test captures everycallby name and everyhostchannel.Before the change, with the final tests in place on
2a0bbb24(client.js reverted to the base):Test 14 — an idle row draws no dot, no count and no digit — passes at the base by design; it is the guard that the fix does not add a number to a quiet row.
Test 16 is the late-roster case on its own: with the roster already read-only at mount the
projectsread alone proves nothing, so this one mounts onready: falsewith noreadOnly, rerenders the read-only roster while theprojectsread is still in flight, and then counts —3 !== 0at the base and at the previous tip,0here. Dropping onlylockedRef.current = lockedleaves exactly this test red.After the change
Every check below ran on this tree (
60982080…, single parent2a0bbb24).node --test test/client.test.jsinplugins/workflow: 142 tests / 142 pass / 0 fail.npm testinplugins/workflow: 384 tests / 384 pass / 0 fail (379 at the base; five tests are the addition).npm run verify— exit 0, 4549 tests / 0 fail:arch-docs: OK (4 changed file(s));scripts/lint-plugins.mjsexit 0 (0 errors; the warnings are pre-existing); patches check:ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5),10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/,patches/ds-bot/ is what generate writes (generate is a no-op);build-client --checkexit 0.Ran:
npm run verifywithTZ=UTC ARCH_DOCS_BASE=2a0bbb24adc5b0ee160e1369de891e3a667ee327(core lint,lint-plugins,build-client --check, the patch check,canonicaland every suite), theplugins/workflowsuite before and after, the five new tests on the base tree with the fix removed, andnode .github/scripts/changelog.mjs check.Not run: no real browser or running instance was opened; the read-only mount, the late roster and the row were exercised through the repository's own hook renderer only. The probe-matrix file named in the issue is Product's evidence tree, not part of this repository, so it was not rerun. CI's
packagejob checks (pack check, typecheck, actionlint) are outsidenpm run verify.Policy-signis not written: none of the 4 changed paths is inpolicy/gates.jsongateFiles.Rebase
The branch was rebased onto
2a0bbb24(the squash that landed the#2202work); the only conflict was one paragraph ofdocs/subsystems/workflow.md, resolved by keeping2a0bbb24's wording and appending the two#2222sentences.plugins/workflow/client.jsand its test merged as text and were checked by hand against the three things the new base introduced:error && !renaming && !deleting && !creatingon the page-level alert is still there (plugins/workflow/client.js:2235),openWorkflowAssign'sif (locked) returnwith[locked]in its dependency array is unchanged (plugins/workflow/client.js:2021-2025), and the merge did not drop a base test — the file runs 142, the base's 137 plus the five added ones.The earlier PASS at the previous tip
910d52cdno longer applies: after#2212merged, that tip ismergeable false / dirtyagainst the same two files and cannot enter the queue. This push is a fresh head, so it needs its own conclusion.Coordinates
git diff --stat 2a0bbb24...HEADnames only the four files above:docs/subsystems/workflow.md2/2,plugins/workflow/client.js20/1,plugins/workflow/test/client.test.js169/0,changelog.d/2222-list-live-count.fixed.md1/0.Checkpoint
{
"pr": 2224,
"claim": "Dev-1",
"issue": 2222,
"summary": "A live Workflows list row draws its run count beside the dot and carries it in the row's accessible name, while an idle row draws no dot, count or digit; opening the list in a read-only window keeps the Project read but sends no workflow/ingest for open cards, and a writable window still ingests every open card. The mount effect reads the latest roster each step, so a window that turns read-only after mounting stops writing, including between two cards. Tests count over the whole tree and capture every call and host channel by name.",
"files": ["plugins/workflow/client.js", "plugins/workflow/test/client.test.js", "docs/subsystems/workflow.md", "changelog.d/2222-list-live-count.fixed.md"],
"checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=2a0bbb24adc5b0ee160e1369de891e3a667ee327 npm run verify", "result": "green", "at": "a2acc076a59790e7ea1ce2d8a7c77a2065ed6b63" },
"next": "none — needs a PASS naming this head; then ready"
}